import request from '@/utils/request'
// 封装部门列表接口
export function getDepartments() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

// 获取部门负责人接口
export function getmangerList() {
  return request({
    url: '/sys/user/simple',
    method: 'GET'
  })
}

// 新增子部门接口
export function getdepartmentAPI(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}

// 编辑接口
export function getEditdepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'
  })
}

// 更新部门数据
export function UpdatadepartAPI(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}

// 删除部门信息接口
export function DeldepartAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
